home *** CD-ROM | disk | FTP | other *** search
- /*
- File: AVTransportTrafficLight.h
-
- Contains: Definitions for AVTransportTrafficLight application.
-
- Written by: Erik Staats
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <FW5> 7/8/96 ES Added support for extra menu and snap shot grabbing and playing
- capabilities.
- <FW4> 6/20/96 ES Made this look more a .i generated interface.
- <FW3> 6/20/96 ES Modified contains field.
- <FW2> 6/20/96 ES Filled in contains and written by fields.
- <FW1> 6/20/96 ES first checked in
-
- */
-
- #ifndef __AVTRANSPORTTRAFFICLIGHT__
- #define __AVTRANSPORTTRAFFICLIGHT__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- enum
- {
- kDumpBufferSize = 1000000
- };
-
- // These are for positioning the Disk Initialization dialogs.
-
- #define kDITop 0x0050
- #define kDILeft 0x0070
-
- // kExtremeNeg and kExtremePos are used to set up wide open rectangles and
- // regions.
-
- #define kExtremeNeg (-32768)
- #define kExtremePos (32767 - 1) // Required to address an old region bug
-
- enum
- {
- kInvalidWindowRef = 0
- };
-
- enum
- {
- kMenuBarResourceID = 128,
-
- kTrafficLightWindowResourceID = 128,
-
- kStopRectResourceID = 128,
- kGoRectResourceID = 129,
-
- kAboutAlertResourceID = 128
- };
-
- enum
- {
- kAppleMenuID = 128,
- kAboutAppleMenuItem = 1,
-
- kFileMenuID = 129,
- kNewFileMenuItem = 1,
- kCloseFileMenuItem = 4,
- kQuitFileMenuItem = 12,
-
- kEditMenuID = 130,
- kUndoEditMenuItem = 1,
- kCutEditMenuItem = 3,
- kCopyEditMenuItem = 4,
- kPasteEditMenuItem = 5,
- kClearEditMenuItem = 6,
-
- kExtraMenuID = 131,
- kCaptureSnapShotMenuItem = 1,
- kPlaySnapShotMenuItem = 2,
- kStopSnapShotMenuItem = 3
- };
-
- struct AVTTrafficLightAppDataStruct
- {
- QDGlobals qdGlobals; // Quickdraw globals for our application.
-
- struct TrafficLightDataStruct
- *trafficLightDataList; // List of traffic lights.
-
- Rect stopRect, // Rects for lights.
- goRect;
-
- AEEventHandlerUPP openApplicationEventHandler; // Handler for open application events.
- Boolean openApplicationEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP openDocumentsEventHandler; // Handler for open documents events.
- Boolean openDocumentsEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP printDocumentsEventHandler; // Handler for print documents events.
- Boolean printDocumentsEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP quitApplicationEventHandler; // Handler for quit application events.
- Boolean quitApplicationEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP deviceAddedEventHandler; // Handler for device added events.
- Boolean deviceAddedEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP deviceRemovedEventHandler; // Handler for device removed events.
- Boolean deviceRemovedEventHandlerInstalled; // True if handler was successfully installed.
-
- AVTClientID avtClientID; // Our client ID for the AV transport control driver family.
-
- Ptr dumpBuffer; // Buffer for dumping video.
- UInt32 dumpBufferSize; // Size allocated for above buffer.
- Boolean gotSnapShot; // True if we've gotten a snap shot.
-
- Boolean inForeground; // True if app is in foreground.
- Boolean quit; // Flag to tell event loop to quit.
- };
- typedef struct AVTTrafficLightAppDataStruct
- AVTTrafficLightAppData,
- *AVTTrafficLightAppDataPtr;
-
- struct TrafficLightDataStruct
- {
- struct TrafficLightDataStruct
- *pNextTrafficLightData; // Link to next data record.
- WindowRef trafficLightWindowRef; // Window reference for this traffic light.
- AVTDriverID avtDriverID; // Reference to driver we control.
- Boolean snapShotPlaying; // True if snap shot is playing.
- Boolean stopped; // State of traffic light.
- };
- typedef struct TrafficLightDataStruct
- TrafficLightData,
- *TrafficLightDataPtr;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __AVTRANSPORTTRAFFICLIGHT__ */
-